package com.demo.service.impl;

import com.demo.dao.CourseDao;
import com.demo.dao.UserDAO;
import com.demo.dao.impl.CourseDaoImpl;
import com.demo.dao.impl.UserDAOImpl;
import com.demo.entity.Course;
import com.demo.entity.User;
import com.demo.service.CourseService;

import java.io.Serializable;
import java.util.Map;

public class CourseServiceImpl implements CourseService {
    public void add(Course vo) {
        //你看这个对象是哪个
        CourseDao courseDao = new CourseDaoImpl();

        courseDao.add(vo);
    }

    //@Override
    public void delete(long id) {
        CourseDao courseDao = new CourseDaoImpl();

        courseDao.delete(id);
    }

    //@Override
    public void update(Course vo) {
        CourseDao courseDao = new CourseDaoImpl();

        courseDao.update(vo);
    }

    //@Override
    public Course get(Serializable id) {
        CourseDao courseDao = new CourseDaoImpl();
        return courseDao.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        CourseDao courseDao = new CourseDaoImpl();
        return courseDao.list(params);
    }
}
